1. Field of the Invention
The present invention relates to a method and apparatus for coding continuous-tone still images.
2. Description of the Related Art
A copier or facsimile apparatus having a copy function converts the content of a document to be copied or transmitted to an electrical signal using an optical reader.
Images to be input are broadly grouped into photographic images, bi-level images and multi-valued images.
Multi-valued images are further grouped into a set of local multi-valued images and also locally multi-valued images.
The first refers to an image of part of a binary image which is locally so blurred that it appears to be a multi-valued image such as edges of a character image (binary image) read through an optical system, and the latter refers to an image, any part of which is completely multi-valued in a microscopic view such as a photographic image
This specification will regard photographic images and multi-valued images as photographic images. Moreover, since a typical example of a bi-level image is a character image, this specification will express a bi-level image as a character image (synonymous with a line drawing image) hereafter.
When a mixed image of character images and photographic images is coded, making drastic improvement of the quality of reproduced images compatible with improvement of compressibility involves various kinds of difficulty.
One of efficient and high accuracy methods for coding a mixed image is a method consisting of segmentation (determining) of an image area using a small block as a unit and carrying out coding that matches the type of the image based on the result of this image area decision (Unexamined Japanese Patent Publication No. HEI 8-51537 and Unexamined Japanese Patent Publication No. HEI 11-289461).
The Unexamined Japanese Patent Publication No. HEI 11-289461 describes the technology previously proposed by the inventor of this patent application. FIG. 38 shows the drawing included in the Unexamined Japanese Patent Publication No. HEI 11-289461.
As shown in FIG. 38, one stripe (ST: a zone which extends in a horizontal direction) of an input image is divided into a plurality of blocks (the size of each block is 8 pixels×8 pixels) and it is decided for each block whether the image block is a photographic image or bi-level image.
Then, a bi-level image is subjected to coding based on JBIG (Joint Bi-level Image Coding Experts Group) and a photographic image is subjected to coding based on JPEG (Joint Photographic Coding Experts Group).
However, carrying out block-by-block image area decision may sometimes deteriorate the quality of a reconstructed image.
For example, in image data captured using an optical system such as a scanner, the edges of a character image (line drawing image) or dot image become duller (that is, concentration distribution becomes sluggish) due to an MTF characteristic of the optical system, and gray-scale components are thereby produced.
It is generally difficult to apply image area decision to such an area. For example, a distribution of pixel level at the edges of a character becomes sluggish and it happens with considerable frequency that some blocks are recognized as photographic images, while adjacent blocks are recognized as bi-level images.
Since different coding systems are adopted according to the image area decision result, the reconstructed pixel level varies depending on the coding system used.
Thus, at the edges of a character image that should originally have a sharp outline, an area which is reproduced as a photographic image area is unnaturally mixed into a bi-level image area, producing mottling (whitish area mixed into a black area), which in turn blurs the reconstructed image.
When a gray-scale image such as a photograph and a clear black character are mixed in one image, it is visually very important that the outline of the character be sharply reproduced.
Or, for example, in the field of calligraphy or ink painting which is one of Japanese traditional arts, it is often the case that the outline of a character or part of a background has extremely natural gradation. In such a case, it is important to reproduce the natural gradation as is.
On the other hand, attempting to encode using a sophisticated segmentation technique with primary importance attached to the quality of a reproduced image inevitably will cause an increase of entropy (amount of information) and inevitably reduce compressibility.
Furthermore, an actual problem in realizing a coding apparatus is the problem associated with cost of image memory.
A digital multi-functional peripheral (MFP) that integrates a copier function and printer function temporarily stores an input image in memory, then reconstructs, applies image processing and prints the image. When high resolution is used, the volume of image data per page becomes enormous and therefore the image data is normally compressed and stored in memory.
This memory is required to have a capacity enough to store at least one-page coded data. For example, when image data is compressed using JPEG, the code data size varies a great deal according to the complexity of the image data.
Therefore, it is necessary to install one-page of image memory taking into account the worst case of the image pattern.
To reduce the memory cost, fixed-length coding is often used whose code length remains constant regardless of the complexity of the image, but fixed-length coding has poor compressibility and the quality of a reproduced image deteriorates.
On the other hand, applying variable-length coding with primary importance attached to the image quality may cause the code size to exceed the pre-defined memory capacity in the case of a complicated gray-scale image.
That is, as far as there is a possibility that memory will overflow, aiming at ultimate high resolution of the reproduced image may be unrealistic.
Thus, it is difficult to find out a point of harmony among a drastic improvement of image quality, compressibility, memory capacity and cost. This problem becomes more conspicuous as the image quality and compressibility are pursued further.